home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
050
/
madtrb13.arc
/
NOFLASH.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-05-19
|
4KB
|
196 lines
{$u-}
{$c-}
{$u-}
{$c-}
{$x+}
{$k-}
const
time_array : array[1..7] of array[1..50] of char =
('~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~ ~~~~~~~~~~~~ ',
'~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~ ~~~~~~~~~~~~ ',
' ~~~ ~~~ ~~ ~~~ ',
' ~~~ ~~~~~~~~ ~~~~~~ ~~~ ',
' ~~~ ~~~ ~~ ~~~ ',
' ~~~ ~~~~~~~~~~ ~~~~~~~~ ~~~ ',
' ~~~ ~~~~~~~~~~ ~~~~~~ ~~~ ');
type
char_cell = record
code : char;
attr : byte;
end;
screen_type = array[1..25] of array[1..80] of char_cell;
var
ch : char;
i,j,k,l,m,n : byte;
screen : screen_type;
real_screen : ^screen_type;
mode : integer;
procedure update_screen(y,lines : byte);
begin
if mode <> 1 then
repeat until (port[$3da] and 8) = 8;
if mode <> 1 then
port[$3d8] := 1;
move(screen[y],real_screen^[y],lines * 160);
if mode <> 1 then
port[$3d8] := 9;
end;
procedure read_screen(y,lines : byte);
begin
if mode <> 1 then
repeat until (port[$3da] and 8) = 8;
if mode <> 1 then
port[$3d8] := 1;
move(real_screen^[y],screen[y],lines * 160);
if mode <> 1 then
port[$3d8] := 9;
end;
procedure march;
const first_half : string[18] = 'n si sihT ';
second_half : string[18] = 'ot a test ';
var i,j : byte;
ch : char;
procedure position(i : integer;
var x,y : byte);
begin
if i <= 16
then begin
x := 1;
y := i;
end
else begin
x := i - 16;
y := 17;
end;
end;
procedure print(num : byte);
var x,y,
j,k : byte;
i : integer;
begin
j := 0;
for i := num downto num - 17 do
if i > 0
then begin
j := j + 1;
position(i,x,y);
screen[y,x].code := first_half[j];
screen[y,81 - x].code := second_half[j];
if y < 16 then
k := y
else
k := 15;
if (k = 1) and (mode = 1) then
k := 2;
if (k = 9) and (mode = 1) then
k := 10;
screen[y,x].attr := k;
screen[y,81 - x].attr := k;
end;
if y < 17 then
begin
update_screen(1,8);
update_screen(8,8);
update_screen(16,8);
end
else
update_screen(y,1);
end;
begin
for i := 1 to 56 do
print(i);
delay(500);
end;
begin
ClrScr;
real_screen := ptr($b800,0); {change to $b800 for color, $b000 for mono}
fillchar(screen,4000,0);
mode := 2; {change to 2 for color, 1 for mono}
for i := 1 to 50 do {Display initial banner}
for j := 1 to 7 do
begin
screen[j,i].code := time_array[j,i];
screen[j,i].attr := 15;
end;
update_screen(1,8);
for i := 1 to 8 do
begin
for j := 7 downto 0 do
begin
move(screen[j + i],screen[j + i + 1],120);
fillchar(screen[j + i],120,0);
end;
update_screen(i,8);
end;
delay(250);
for i := 9 downto 1 do {Tilt banner}
begin
move(screen[i + 8,1],screen[i + 8,11 - i],120);
fillchar(screen[i + 8,1],19 - (2 * i),0);
end;
update_screen(8,8);
delay(250);
for k := 1 to 14 do {Center banner}
begin
for j := 9 to 17 do
move(screen[j,k],screen[j,k + 1],120);
update_screen(8,8);
end;
for i := 9 downto 1 do {UnTilt banner}
move(screen[i + 8,11 - i],screen[i + 8,1],160);
update_screen(8,8);
march; {Bring in the rest of the title}
gotoxy(28,25);
write('(Press Any Key To Start)');
read(kbd,ch);
read_screen(1,25);
for i := 8 downto 1 do {Tilt banner}
begin
move(screen[i+8,1],screen[i + 8,11 - i],120);
fillchar(screen[i + 8,1],19 - (2 * i),0);
end;
update_screen(8,8);
delay(250);
for k := 11 to 79 do {Remove banner}
begin
for j := 9 to 15 do
move(screen[j,k],screen[j,k + 1],160 - k * 2);
update_screen(8,8);
end;
end.